// 导入组件
import Vue from "vue";
import Router from "vue-router";
// 登录
import login from "@/views/login";
// 首页
import index from "@/views/index";
/**
 * 基础菜单
 */
// 商品管理
import Goods from "@/views/goods/Goods";
// 机器信息管理
import Machine from "@/views/machine/Machine";
// 货道信息管理
import MachineAisle from "@/views/machine/MachineAisle";
/**
 * 订单管理
 */
// 交易订单
import Order from "@/views/pay/Order";
/**
 * 系统管理
 */
// 用户管理
import user from "@/views/system/user";
// 菜单管理
import Module from "@/views/system/Module";
// 角色管理
import Role from "@/views/system/Role";
// 公司管理
import Dept from "@/views/system/Dept";
// 系统环境变量
import Variable from "@/views/system/Variable";
// 权限管理
import Permission from "@/views/system/Permission";
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from "@/views/machine/MachineConfig";
// 支付配置
import Config from "@/views/pay/Config";
/**
 * 数据监控
 */
// 监控查询
import druidLogin from "@/views/druid/login";

// 图表界面
import statistics from "@/views/charts/statistics";

// -------------------上方为原项目，下方为新引入----------------------

// 员工管理
import Employeemain from "@/views/system/employee/EmployeeMain";

// 药品信息维护
import MedicineInfo from "@/views/medicine/Info";

// 药品
import MedicineStock from "@/views/medicine/Stock";

// 药品调价
import MedicinePrice from "@/views/medicine/Price";

// 挂号单创建
import registerCreate from "@/views/register/RegisterCreate";

// 挂号单创建
import registerHistory from "@/views/register/RegisterHistory";

// 工作台
import Workbench from "@/views/workbench/Workbench";

// 工作台卡片
import Card from "@/views/workbench/Card";

//患者管理
import PatientSelect from "@/views/patient/PatientSelect";
import Address from "@/views/patient/Address";
import PatientMain from "@/views/patient/PatientMain";

//经营概况
import Operations from "@/views/operationsummary/Operations";

// 工作台-新增病例和处方
import PrescriptionCase from "@/views/workbench/PrescriptionCase";

// 工作台-查看患者信息
import PatientInfo from "@/views/workbench/PatientInfo/";
// 系统报表——收费报表
import ChargeStatistics from "@/views/statisticalreport/ChargeStatistics";

//费用设置
import Chargemain from "@/views/system/charge/ChargeMain";
//收费管理
import ChargeManagement from "@/views/charge/chargeManagement";
//收费详情信息
import ChargeInformation from "@/views/statisticalreport/ChargeInformation";
// // 附加费用设置
// import Employee from '@/views/system/charge/Additional';
// // 诊疗费用设置
// import Office from '@/views/system/charge/Medical';
// // 挂号费用设置
// import Rolelist from '@/views/system/charge/Registration';
// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
  routes: [
    {
      path: "/",
      name: "",
      component: login,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/login",
      name: "登录",
      component: login,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/index",
      name: "首页",
      component: index,
      iconCls: "el-icon-tickets",
      children: [
        {
          path: "/goods/Goods",
          name: "商品管理",
          component: Goods,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/machine/Machine",
          name: "机器信息管理",
          component: Machine,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/machine/MachineAisle",
          name: "货道信息管理",
          component: MachineAisle,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/pay/Order",
          name: "交易订单",
          component: Order,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/system/user",
          name: "用户管理",
          component: user,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/system/Module",
          name: "菜单管理",
          component: Module,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/system/Role",
          name: "角色管理",
          component: Role,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/system/Dept",
          name: "公司管理",
          component: Dept,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/system/Variable",
          name: "系统环境变量",
          component: Variable,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/system/Permission",
          name: "权限管理",
          component: Permission,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/machine/MachineConfig",
          name: "支付配置信息",
          component: MachineConfig,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/pay/Config",
          name: "支付配置",
          component: Config,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/druid/login",
          name: "监控查询",
          component: druidLogin,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/charts/statistics",
          name: "数据可视化",
          component: statistics,
          meta: {
            requireAuth: true
          }
        },
        // 新增路由

        // 系统设置-员工管理
        {
          path: "/system/employeemain",
          name: "员工管理",
          component: Employeemain,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/system/chargemain",
          name: "费用设置",
          component: Chargemain,
          meta: {
            requireAuth: true
          }
        },

        //收费管理
        {
          path: "/charge/chargeManagement",
          name: "收费管理",
          component: ChargeManagement,
          meta: {
            requireAuth: true
          }
        },
        // 药品
        {
          path: "/medicine/info",
          name: "药品信息维护",
          component: MedicineInfo,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/medicine/stock",
          name: "药品库存",
          component: MedicineStock,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/medicine/price",
          name: "药品库存",
          component: MedicinePrice,
          meta: {
            requireAuth: true
          }
        },
        // 挂号
        {
          path: "/register/registercreate",
          name: "挂号单创建",
          component: registerCreate,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/register/registerhistory",
          name: "挂号历史记录",
          component: registerHistory,
          meta: {
            requireAuth: true
          }
        },
        // 工作台
        {
          path: "/workbench/workbench",
          name: "工作台",
          component: Workbench,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/workbench/prescriptionCase",
          name: "工作台-新增病例和处方",
          component: PrescriptionCase,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/workbench/patientInfo",
          name: "工作台-查看患者信息",
          component: PatientInfo,
          meta: {
            requireAuth: true
          }
        },
        // 工作台卡片
        {
          path: "/workbench/card",
          name: "工作台卡片",
          component: Card,
          meta: {
            requireAuth: true
          }
        },

        //患者管理
        {
          path: "/patient/patientselect",
          name: "患者管理",
          component: PatientSelect,
          meta: {
            requireAuth: true
          }
        },
        //患者统计
        {
          path: "/patient/patientmain",
          name: "患者统计",
          component: PatientMain,
          meta: {
            requireAuth: true
          }
        },
        //经营概况
        {
          path: "/operationsummary/operations",
          name: "经营概况",
          component: Operations,
          meta: {
            requireAuth: true
          }
        },
        //收费统计
        {
          path: "/statisticalreport/chargeStatistics",
          name: "收费统计",
          component: ChargeStatistics,
          meta: {
            requireAuth: true
          }
        },
        //收费详情信息
        {
          path: "/statisticalreport/chargeInformation",
          name: "收费详情",
          component: ChargeInformation,
          meta: {
            requireAuth: true
          }
        },

        //
        {
          path: "/patient/address",
          name: "地址测试",
          component: Address,
          meta: {
            requireAuth: true
          }
        }
      ]
    }
  ]
});
